﻿@model DotNetUniLodz.Models.User

@{
    ViewBag.Title = "Edytujesz dane użytkownika " + Model.User_login;
}

<div id="Content100">
    <h2>Edycja</h2>

    @using (Html.BeginForm())
    {
        @Html.AntiForgeryToken()
        @Html.ValidationSummary(true)

        <fieldset id="CreateItem">
            <legend>Edytuj dane użytkownika</legend>

            @Html.HiddenFor(model => model.User_id)

            <div class="editor-label">
                Login
            </div>
            <div class="editor-field">
                @Model.User_login
            </div>

            <div class="editor-label">
                Imię
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.User_firstName)
                @Html.ValidationMessageFor(model => model.User_firstName)
            </div>

            <div class="editor-label">
                Nazwisko
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.User_lastName)
                @Html.ValidationMessageFor(model => model.User_lastName)
            </div>

            <div class="editor-label">
                Email
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.User_mail)
                @Html.ValidationMessageFor(model => model.User_mail)
            </div>

            <div class="editor-label">
                Obecne hasło
            </div>
            <div class="editor-field">
                @Html.PasswordFor(model => model.User_pass)
            </div>

            <div class="editor-label">
                Nowe hasło
            </div>
            <div class="editor-field">
                @Html.PasswordFor(model => model.User_pass)
                @Html.ValidationMessageFor(model => model.User_pass)
            </div>

            <div class="editor-label">
                Potwierdź nowe hasło
            </div>
            <div class="editor-field">
                @Html.PasswordFor(model => model.User_pass)
                @Html.ValidationMessageFor(model => model.User_pass)
            </div>

            <p>
                <input type="submit" value="Zapisz" />
            </p>
        </fieldset>
    }
    <div>
        @Html.ActionLink("Powrót do strony głównej", "Index", "Home", null, new { @class = "SuperLink" })
    </div>
</div>
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
